const KoaRouter = require('koa-router');
const router = new KoaRouter();

const routerList = require('./routes');

interface route {
    method:string,
    path:string,
    controller:Function,
}

routerList.forEach((item:route) => {
    const {method, path, controller} = item;
    router[method](path, controller);
});

module.exports = router;